<include file="public/header" title="待收货订单" body="f3"/>
<include file="public/header_nav" title="待收货订单" href="javascript:history.back(-1)"/>
<if condition="empty($order_list)">
    <div class="nonenothing">
        <img src="__STATIC__/images/nothing.png"/>
        <p>暂无待收货商品</p>
        <a href="{:U('Mobile/Index/index')}">去逛逛</a>
    </div>
<else/>
    <foreach name="order_list" key="k" item="order">
        <div class="quedbox">
            <div class="shpmi p">
                <div class="maleri30">
                    <div class="dinaot">
                        <span class="naem">订单号：{$order[order_sn]}</span>
                        <span class="red">{$order[order_status_desc]}</span>
                    </div>
                    <!--物流信息-s-->
                    <div class="wuliumess" id="wuliumess{$order.order_id}">
                        <if condition="$order.shipping_status gt 0">
                        <script>
                            queryExpress();
                            function queryExpress()
                            {
                                var shipping_code = "{$order.shipping_code}";
                                var invoice_no = "{$order.invoice_no}";
                                var order_id = "{$order.order_id}"
                                $.ajax({
                                    type : "GET",
                                    dataType: "json",
                                    url:"/index.php?m=Home&c=Api&a=queryExpress&shipping_code="+shipping_code+"&invoice_no="+invoice_no,
                                    success: function(data){
                                        var html = '';
                                        if(data.status == 200){
                                            html +="<i class='yg'></i><p class='naem'>"+ data.data[0].context +"</p><p class='time'><span>"+ data.data[0].time +"</span></p>";
                                        }else{
                                            html +="<i class='yg'></i><p class='naem'>"+  data.message +"</p><p class='time'><span>  </span></p>";
                                        }
                                        $("#wuliumess"+order_id).html(html);
                                    },
                                });
                            }
                        </script>
                        </if>
                    </div>
                    <!--物流信息-e-->
                </div>
            </div>
            <foreach name="order.goods_list" item="good">
                <div class="fukcuid">
                    <div class="maleri30">
                        <div class="shopprice">
                            <div class="img_or fl"><img src="{$good[goods_id]|goods_thum_images=200,200}"></div>
                            <div class="fon_or fl">
                                <h2 class="similar-product-text">
                                    <a href="{:U('Goods/goodsInfo',array('id'=>$good[goods_id]))}">{$good[goods_name]}</a>
                                    <p>{$good['spec_key_name']}</p>
                                </h2>
                            </div>
                            <div class="buttondde inherflo">
                             <!--   <if condition="($order[return_btn] eq 1) and ($good[is_send] lt 2)">
                                    <a href="{:U('Mobile/Order/return_goods',['rec_id'=>$good['rec_id']])}">申请售后</a>
                                </if>-->
                                <if condition="$good[is_send] gt 1">
                                    <a class="applyafts">已申请售后</a>
                                </if>
                            </div>
                        </div>
                    </div>
                </div>
            </foreach>
            <div class="shijefu">
                <div class="maleri30">
                    <p>
                        <span class="fs24">共<em>{$order.count_goods_num}</em>件</span>
                        <span>订单总价￥<em>{$order.total_amount}</em></span>
                    </p>
                    <p class="butna">
                        <!--<a href="">再次购买</a>-->
                        <a href="{:U('Mobile/Order/order_detail',array('id'=>$order.order_id,'waitreceive'=>1))}">查看详情</a>
                        <a style="display: none" class="tuid" href="javascript:void(0);" onclick="expedite('{$order.order_id}')">我要催单</a>
                        <!--<a href="{:U('Mobile/User/express',array('order_id'=>$order.order_id))}">查看物流</a>-->
                        <a class="red receipt" href="javascript:void(0);" >确认收货</a>
                    </p>
                </div>
            </div>
        </div>

        <!--我要催单弹窗-s-->
        <div class="cuidd" id="cuidd{$order.order_id}" >
            <p>您的订单已经交由<span class="red">{$order.shipping_name}</span>进行配送，运单号为<span class="red">{$order.invoice_no}</span></p>
            <div class="weiyi p">
                <a href="javascript:void(0);">取消</a>
                <a class="eno" href="{:U('Mobile/Order/express',array('order_id'=>$order.order_id))}">查看物流</a>
            </div>
        </div>
        <!--我要催单弹窗-e-->

        <!--确认收货弹窗-s-->
        <div class="surshko" id="surshko{$order.order_id}">
            <p>是否收到该订单商品？</p>
            <div class="weiyi p">
                <a href="javascript:void(0);">未收货</a>
                <a class="eno" href="{:U('Mobile/Order/order_confirm',array('id'=>$order.order_id))}">已收货</a>
            </div>
        </div>
        <!--确认收货弹窗-e-->
    </foreach>
</if>
<div class="mask-filter-div" style="display: none;"></div>
<script type="text/javascript" src="__STATIC__/js/sourch_submit.js"></script>
<script>
    var  page = 1;
    /**
     *加载更多
     */
    function ajax_sourch_submit()
    {
        page += 1;
        $.ajax({
            type : "GET",
            url:"/index.php?m=Mobile&c=Order&a=wait_receive&type=WAITRECEIVE&is_ajax=1&p="+page,
            success: function(data)
            {
                if(data == '')
                    $('#getmore').hide();
                else
                {
                    $("#getmore").before(data);
                }
            }
        });
    }
</script>
</body>
</html>
